﻿using System;
using System.IO;

namespace OpenLS.Spreadsheet.Formats.Biff.Records
{
    internal class TxOLastRun
    {
        private ushort cchText;
        private ushort unused1;
        private uint unused2;

        public int Index
        {
            get { return cchText; }
        }

        public TxOLastRun(ushort index)
        {
            this.cchText = index;
        }

        public TxOLastRun()
        {
            
        }
        public void Read(MultiBinaryReader reader)
        {
            this.cchText = reader.ReadUInt16();
            unused1 = reader.ReadUInt16();
            this.unused2 = reader.ReadUInt32();
        }

        public void Write(BinaryWriter writer)
        {
            writer.Write(cchText);
            writer.Write(unused1);
            writer.Write(unused2);
        }
    }
}